
var express = require('express');
var router = express.Router();
var path = require("path");

// 获取验证模块
var authorization = require(path.join(process.cwd(),"/modules/authorization"));
// 通过验证模块获取用户管理服务
var AccServ = authorization.getService("AccountService");

router.put("/",
    // 处理业务逻辑

    function(req,res,next) {
        console.log('528528528528')
        console.log(req.body)

         AccServ.modifyPassword(req.body.name,req.body.pwd.oldpassword,req.body.pwd.newpassword,function (err,result) {
            if (err) return   res.sendResult(null,201,err);
            return   res.sendResult(null,200,"修改成功");
        })(req,res,next)
    },
)

module.exports = router;
